﻿using System.Web.Mvc.Ajax;
using Evolus.Mercury.Model;

namespace Evolus.Mercury.Web.Models
{
    public class StockQuote
    {        
        public string Symbol { get; set; }
        public decimal LastTradedPrice { get; set; }
        public decimal Change { get; set; }
        public int TotalMatchedVolume { get; set; }
        public ChangeType ChangeType { get; set; }

        public StockQuote()
        {
        }

        public StockQuote(StockInfo stockInfo)
        {
            this.Symbol = stockInfo.Stock.Symbol;
            this.LastTradedPrice = stockInfo.LastTradedPrice;
            this.Change = stockInfo.Change;
            this.ChangeType = stockInfo.ChangeType;
            this.TotalMatchedVolume = stockInfo.TotalMatchedVolume;
        }

        public StockQuote(string symbol, decimal lastTradedPrice, decimal change, ChangeType changeType)
        {
            this.Symbol = symbol;
            this.LastTradedPrice = lastTradedPrice;
            this.Change = change;
            this.ChangeType = changeType;
        }
    }
}
